package org.zh.home.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="zh_resource")
public class Resource {
	/**
	 * 主键
	 */
	private int id;
	/**
	 * 资源名称
	 */
	private String name;
	/**
	 * 资源类型：0 公共资源 （用户id） 私有资源   私有资源只能自己访问
	 * 如果是公共资源才能进行权限控制、私有资源则判断 type是否是当前登录用户id
	 */
	private int type;
	/**
	 * 权限控制位
	 * 每个控制位分为  CUD  添加 修改 删除  只要有添加、修改或删除权限则有查询权限Read
	 * 分别对应              111
	 * 最高权限除了私有资源 都能访问
	 */
	private String authority;
	/**
	 * 资源路径 url
	 */
	private String url;
	/**
	 * 预留参数
	 */
	private String param1;
	private String param2;
	private String param3;
	private String param4;
	private String param5;
	private String param6;
	
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getAuthority() {
		return authority;
	}
	public void setAuthority(String authority) {
		this.authority = authority;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getParam1() {
		return param1;
	}
	public void setParam1(String param1) {
		this.param1 = param1;
	}
	public String getParam2() {
		return param2;
	}
	public void setParam2(String param2) {
		this.param2 = param2;
	}
	public String getParam3() {
		return param3;
	}
	public void setParam3(String param3) {
		this.param3 = param3;
	}
	public String getParam4() {
		return param4;
	}
	public void setParam4(String param4) {
		this.param4 = param4;
	}
	public String getParam5() {
		return param5;
	}
	public void setParam5(String param5) {
		this.param5 = param5;
	}
	public String getParam6() {
		return param6;
	}
	public void setParam6(String param6) {
		this.param6 = param6;
	}
}
